<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mdsproject/mds_logisticsitealias/Mds_LogisticSiteAlias.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mdsproject/mds_logisticsitealias/Mds_LogisticSiteAlias.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Mds_LogisticSiteAlias",
        setup() {
            const table = ref({
                key: "LogisticSiteAliasId",
                editTable:true ,
                footer: "Foots",
                cnName: "物流点位别名",
                name: "mds_logisticsitealias/Mds_LogisticSiteAlias",
                newTabEdit: false,
                url: "/Mds_LogisticSiteAlias/",
                sortName: "LogisticSiteAliasId"
            });
            const editFormFields = ref({"LogisticSiteId":"","MachineId":"","RealDeviceId":"","ConfirmSiteCode":"","SiteCodeAlias":"","Enabled":"","Remarks":""});
            const editFormOptions = ref([[{"title":"物流点位","field":"LogisticSiteId","type":"number"},
                               {"title":"待命确认点","field":"ConfirmSiteCode"},
                               {"dataKey":"BASE_Machine_Lgt","data":[],"title":"物流设备","field":"MachineId","type":"select"},
                               {"dataKey":"MDS_RealDevice","data":[],"title":"关联数采设备","field":"RealDeviceId","type":"select"}],
                              [{"title":"点位编号别名","field":"SiteCodeAlias"},
                               {"dataKey":"enabled","data":[],"title":"是否启用","field":"Enabled","type":"switch"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"LogisticSiteAliasId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticSiteId",title:"物流点位",type:"bigint",width:110,hidden:true,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"MachineId",title:"物流设备",type:"bigint",bind:{ key:"BASE_Machine_Lgt",data:[]},width:160,edit:{type:"select"},showOverflowTooltip:true,align:"left"},
                       {field:"RealDeviceId",title:"关联数采设备",type:"bigint",bind:{ key:"MDS_RealDevice",data:[]},width:150,edit:{type:"select"},showOverflowTooltip:true,align:"left"},
                       {field:"SiteCodeAlias",title:"点位编号别名",type:"string",width:120,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"ConfirmSiteCode",title:"待命确认点",type:"string",width:120,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"是否启用",type:"int",bind:{ key:"enabled",data:[]},width:110,edit:{type:"switch"},showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,hidden:true,edit:{type:"textarea"},showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
